import request from "@/utils/request";

// 获得门店业绩任务历史分页
export function getTaskHistoryPage(query) {
  return request({
    url: "/store/task-his/page",
    method: "get",
    params: query,
  });
}

// 获得门店业绩任务分页
export function getTaskPage(query) {
  return request({
    url: "/store/task/page",
    method: "get",
    params: query,
  });
}

// 创建门店业绩任务
export function CreateTasks(data) {
  return request({
    url: "/store/task/create",
    method: "post",
    data: data,
  });
}

// 更新门店业绩任务
export function UpdateTasks(data) {
  return request({
    url: "/store/task/update",
    method: "post",
    data: data,
  });
}

// 取消任务/撤销取消
export function getCancelTask(query) {
  return request({
    url: "/store/task/cancel",
    method: "get",
    params: query,
  });
}

// 获得门店业绩任务
export function getStoreTaskPage(query) {
  return request({
    url: "/store/task/get",
    method: "get",
    params: query,
  });
}

// 城市经理日报
export function getCityManager(data) {
    return request({
      url: "/order/finance/store/city/day",
      method: "post",
      data: data,
    });
  }


// 城市经理周报
export function getCityManagerWeek(data) {
    return request({
      url: "/order/finance/store/city/week",
      method: "post",
      data: data,
    });
}

// 确认业绩
export function SureConfirm(query) {
    return request({
      url: "/store/task/confirm",
      method: "get",
      params: query,
    });
  }
